﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using GNF.GNFService.GNFClient;
using GNF.Geo;

namespace GNF.WPFControls
{
    /// <summary>
    /// Interaction logic for GNFEnabledBasicViewer.xaml
    /// </summary>
    [Obsolete()]
    public partial class GNFEnabledBasicViewer : UserControl
    {

        #region private memebrs
        private GNFServiceClient _client = new GNFServiceClient();

        private GPSData _data = new GPSData();

        #endregion

        #region Construction and init

        public GNFEnabledBasicViewer()
        {
            InitializeComponent();
        }

        #endregion

        #region events

        private void GNFEnabledBasicViewer_Loaded(object sender, RoutedEventArgs e)
        {
            _client.Connect();
            _client.GPSDataChanged += new TimedOnGPSDataChangedEventHandler(ChangeData);
        }


        private void ChangeData(GPSData data, DateTime changeTime)
        {
            _data.ChangeTo(data);
        }

        #endregion
    }
}
